from dataclasses import dataclass

@dataclass
class TestingEnvironment:
    """ 测试环境"""
    HOST = "http://124.70.39.201"
    USERNAME = 'admin'
    PASSWORD = "123123"
    DB = {"host": '172.16.0.166', "port": 3306, "user": 'hxadmin', "password": 'huaxin2017', "db": 'xxy'}
    print(HOST)
@dataclass
class PreProduction:
    """ 预发布环境"""
    HOST = 'http://124.70.39.202/'

@dataclass
class DevEnvironment:
    """ 开发环境"""
    HOST = 'http://124.70.39.203/'

ENV_MAP = {
    '测试环境': TestingEnvironment,
    '预发布环境': PreProduction,
    '开发环境': DevEnvironment
}

ENV_NAME = '测试环境'
ENV = ENV_MAP[ENV_NAME]()